home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
struct.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
2KB
|
67 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
__version__ = '0.1'
from _struct import Struct, error
_MAXCACHE = 100
_cache = { }
def _compile(fmt):
if len(_cache) >= _MAXCACHE:
_cache.clear()
s = Struct(fmt)
_cache[fmt] = s
return s
def calcsize(fmt):
try:
o = _cache[fmt]
except KeyError:
o = _compile(fmt)
return o.size
def pack(fmt, *args):
try:
o = _cache[fmt]
except KeyError:
o = _compile(fmt)
return o.pack(*args)
def pack_into(fmt, buf, offset, *args):
try:
o = _cache[fmt]
except KeyError:
o = _compile(fmt)
return o.pack_into(buf, offset, *args)
def unpack(fmt, s):
try:
o = _cache[fmt]
except KeyError:
o = _compile(fmt)
return o.unpack(s)
def unpack_from(fmt, buf, offset = 0):
try:
o = _cache[fmt]
except KeyError:
o = _compile(fmt)
return o.unpack_from(buf, offset)